package com.fox.imagedb.action;

import java.awt.event.ActionEvent;
import java.io.File;

import javax.swing.AbstractAction;

import com.fox.imagedb.gui.MainPanel;

public class PreviousImageAction extends AbstractAction {

	private static final long serialVersionUID = 1L;
	private MainPanel mainPanel;

	public PreviousImageAction(MainPanel mainPanel) {
		super();
		this.mainPanel = mainPanel;
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
		// FIXME
		File newImage = mainPanel.getFileExplorer().previousImage();
		mainPanel.updateImage(newImage);
	}

}
